<!--包含头部文件-->

{include file="public/head" /}

<body>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i>商品列表 </nav>

<div class="page-container">



	<div class="mt-20">

	    <form action="{:url('goods/goodslist')}" method="GET">

	    	<div class="formControls col-xs-8 col-sm-2"> 

	    		<span class="select-box">

					<select class="select" id="goods_cate_id" name="goods_cate_id">

						<option value="">选择分类</option>

						{volist name="cate_list1" id="vo"}

							<option value="{$vo.id}"

				            {if condition="$vo.id eq $cate_id"}

							selected="" 

							{/if}

							><?php echo str_repeat('-', 5*$vo['cate_level']); ?>{$vo.cate_name}</option>

						{/volist}

					</select>

				</span>

			</div>


			<div class="formControls col-xs-8 col-sm-2"> 

	    		<span class="select-box">

					<select class="select"  name="goods_status">

						<option value="1" {if condition="$goods_status eq 1"}selected="selected"{/if}>上架商品</option>

						<option value="-1" {if condition="$goods_status eq -1"}selected="selected"{/if}>下架商品</option>

					</select>

				</span>

			</div>		
			
		

			

			<div class="formControls col-xs-8 col-sm-3">

				<input type="text" value="" name="goods_name" class="input-text col-sm-3" placeholder="{$search_key|default='请输入商品名称或关键字'}">

			</div>	

			<button class="btn btn-success" type="submit"><i class="Hui-iconfont"></i> 搜索</button>

		</form>

		<div class="cl pd-5 bg-1 bk-gray mt-20"> 
			<span class="l"> <a class="btn btn-primary radius"  href="{:url('goods/add')}"><i class="Hui-iconfont">&#xe600;</i> 添加</a></span> 
			<span class="r tishi" style="margin-top: 8px;">注意：商品删除后可在回收站恢复</span> 
		</div>

			<table class="table table-border table-bordered table-bg table-hover table-sort mt-20">

				<thead>

					<tr class="text-c">

						<th width="40">ID</th>

						<th width="250">名称</th>

						<th width="110">缩略图</th>

						<th width="70">价钱</th>
						<th width="70">所属分类</th>
						<th width="50">排序序号<br><span class="tishi" style="font-weight: normal;">数字越小越靠前</span></th>

						<th width="40">更新时间</th>

						<th width="50">商品状态</th>

						<th width="50">操作</th>

					</tr>

				</thead>

				<tbody>

					{volist name="goodsData" id="vo"}

					<tr class="text-c">

						<td>{$vo.goods_id}</td>

						<td><?php echo str_replace($search_key,"<span style='color:#f00'>".$search_key."</span>",$vo['goods_name']);?></td>

						<td><a href="{:url('shop/goods/index',array('goods_id'=>$vo.goods_id))}" target="_blank"><img src="{$vo.goods_thumb}" width="100"></a></td>

						<td>{$vo.goods_price}</td>
						<td>{$vo.cate_name}</td>
						<td class="text-c goods_listorder">
							<input size="10" attr-id="{$vo.goods_id}"  name="listorder"  value="{$vo.listorder}"/>
						</td>

						<td>{$vo.time|date="Y-m-d H:i"}</td>

						<td class="td-status status">
							<a href="{:url('goods/status',array('goods_id'=>$vo.goods_id,))}" style="text-decoration: none">{if condition="$vo.goods_status eq 1"}<span class='label label-success radius'>已上架</span>{else}<span class='label label-danger radius'>已下架</span>{/if}</a>
						</td>

						<td class="td-manage">
							{if condition="$goods_status eq 1"}
							<a style="text-decoration:none" class="ml-5" href="{:url('goods/edit',array('goods_id'=>$vo.goods_id))}" title="修改"><i class="Hui-iconfont">&#xe6df;</i></a>
							<a style="text-decoration:none" class="ml-5" onclick="delete_confirm('{:url('goods/status',array('goods_id'=>$vo.goods_id))}')" href="javascript:;" title="放入回收站"><i class="Hui-iconfont">&#xe6e2;</i></a>
							{else/}
							<a style="text-decoration:none" class="ml-5" onclick="delete_confirm('{:url('goods/status',array('goods_id'=>$vo.goods_id))}')" href="javascript:;" title="恢复"><i class="Hui-iconfont">&#xe66b;</i></a>
							{/if}
						</td>

					</tr>

					{/volist}

					

				</tbody>

			</table>

			{$goodsData|raw}

		

	</div>

</div>

<!--包含头部文件-->

{include file="public/foot" /}

